home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Data 2002 May / CD Rom Data Mayıs 2002.iso / Freeware / Blitz Basic / data1.cab / Support / help / beginners / tutorial / random numbers.bb < prev    next >
Encoding:
Text File  |  2002-04-10  |  720 b   |  27 lines

  1. ; Very simple random number game by George Bray
  2. ; georgebray@breathemail.net
  3. ; http://users.breathemail.net/georgebray
  4.  
  5. Print "Escape from the furry animals of Ancipital"
  6. SeedRnd(MilliSecs()) 
  7. f=Rnd(20) 
  8. For g=1 To 5
  9.  guess = Input ("Guess the frequency of the menagerie? (0 - 20) ")
  10. If guess=f Then Goto goat
  11. If guess<f Then Gosub cow
  12. If guess>f Then Gosub head
  13.  
  14. .g Next
  15. Print"*******BooooooooooooooM******* The menagerie exploded. The correct frequency was: ": Print f
  16. MouseWait
  17. End
  18. .cow Print "Frequency too low - Careful":Return 
  19. .goat Print "WELL DONE DUDE - YOU ESCAPED FROM THE FURRY ANIMALS OF ANCIPITAL"
  20. MouseWait
  21. End
  22. .head Print"Frequency too high - try again":Return
  23. MouseWait
  24. End
  25.  
  26.  
  27.